#include <iostream>
#include <string>

/*
 * We ave 2 alghorithms a main and a child one
 * An example of inheritance and OOP programming in c++
 *
 */

class MainAlgorithm{
     protected :
        std::string name;
        std::string On; //O(n) thing
    
     public:
        MainAlgorithm(){std::cout<<"Main construct without args"<<std::endl;}
        MainAlgorithm(std::string n,std::string o){name=n; On=o; std::cout <<"Main construct with args "<< name<<std::endl;}

        void print_info();
        int computation();
        void set_values(std::string,std::string);
};

//The inheritance oart here
class BetterAlgorithm : public MainAlgorithm{

    public:
        BetterAlgorithm(){}
        BetterAlgorithm(std::string n,std::string o):MainAlgorithm(n,o){}

        // The overriden part here
        int computation();

};
